package com.exam.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.exam.demo.controller.dto.QuestionDTO;
import com.exam.demo.entity.Answer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 功能描述
 *
 * @author yxj30
 * @date 2022/03/16  19:31
 */
@Mapper
public interface AnswerMapper extends BaseMapper<Answer> {
//    @Select("select answer.*,question.correct_answer from answer left join question on question.question_id = answer.question_id where answer.paper_id = #{paper_id} and answer.student_id = #{student_id} ")
    List<QuestionDTO> getAnswerByStudentIdAndPaperId(@Param("paper_id") String paperId, @Param("student_id") String studentId);
//    @Select("select * from admin where admin_name like #{admin_name}")
//    Page<Admin> findPage(Page<Admin> objectPage, @Param("admin_name") String name);

}
